/*
 lg.bind('lg_init', init);

function init() {	
	//Add Pages
	//lg.page.create({id:'info', url:'info.html', title:'Info', desc:'Device information', callback:'setInfo', navigation:true, type:'internal'});
	//lg.page.create({id:'contacts', url:'contacts.html', title:'Contacts', desc:'Contact directory', callback:'setContacts4', navigation:true, type:'internal'});
	console.log('Shell::init');
	
	//lg.tabs.add({btn:1, title:'Info', icon:'btn1.png', callback:'gotoInfo()'});
	//lg.tabs.add({btn:2, title:'Contact', icon:'btn2.png', callback:'gotoContacts()'});
	
	//lg.navigation.show();
	//lg.tabs.show();;
	console.log('info: '+lg.info.batteryLevel + ' ' + lg.info.batteryState + ' ' + lg.info.proximity);
}

function gotResults() {
	console.log('gotResults');
	console.log(lg.location.latitude);
}
*/
console.log('bind');
lg.bind('lg_init', initTabs);

function initTabs() {
	console.log('initTabs');
	lg.tabs.add({btn:1, title:'Home', icon:'btn1.png', callback:'onTabClick1');
	lg.tabs.add({btn:2, title:'Files', icon:'btn2.png', callback:'onTabClick2');
	lg.tabs.add({btn:3, title:'Favorites', icon:'btn3.png', callback:'onTabClick3');
	lg.tabs.show();
}

function onTabClick1() {
	console.log('tab one clicked');
}

function onTabClick2() {
	console.log('tab two clicked');
}

function onTabClick3() {
	console.log('tab three clicked');
}